<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">
    function page(n,s){
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchForm").submit();
        return false;
    }
</script>
<div class="content-wrap">
    <div class="wrapper" style="bottom: 50px;">
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="#"   onclick="loadDiv('mainCenterDiv','${ctx}/csm/expSupplierCata/index')">消耗品厂商列表</a>
            </li>
            <li>
                <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/csm/expSupplierCata/form')">消耗品厂商添加</a>
            </li>
        </ul>
        <section class="panel panel-default">
            <div class="panel-body">
                <div class="table-responsive no-border">
                    <div class="datatable-top">
                        <div class="pull-left">
                            <form:form id="searchForm" modelAttribute="expSupplierCata"  onsubmit="return loadDivForm('mainCenterDiv','searchForm','${ctx}/csm/expSupplierCata/index');" method="post" class="form-inline">
                                <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                <label>厂商类别:&nbsp;&nbsp;</label>
                                <form:select path="supplierClass" class="form-control" data-parsley-required="true">
                                    <form:option value="" label=""/>
                                    <form:options items="${fns:getDictList('SUPPLIER_CLASS')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                                </form:select>
                                <div class="form-group"><label>厂商拼音码:&nbsp;&nbsp;</label><form:input path="inputCode" maxlength="50" class="form-control"></form:input></div>
                                <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                            </form:form>
                        </div>
                    </div>
                    <table id="contentTable" class="table table-bordered mg-t datatable">
                        <thead>
                        <tr>
                            <th>供应商别名</th>
                            <th>供应商全称</th>
                            <th>厂商类别</th>
                            <th>地址</th>
                            <th>邮编</th>
                            <th>法人姓名</th>
                            <th>联系电话</th>
                            <th>营业执照号</th>
                            <th>营业执照期限</th>
                            <th>生产经营许可证号</th>
                            <th>许可证期限</th>
                            <th>备注信息</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${page.list}" var="expSupplierCata">
                        <tr>
                            <td> ${expSupplierCata.supplierJc}</td>
                            <td> ${expSupplierCata.supplierName}</td>
                            <td> ${fns:getDictLabels(expSupplierCata.supplierClass, 'SUPPLIER_CLASS', '')}</td>
                            <td> ${expSupplierCata.supplierAddress}</td>
                            <td> ${expSupplierCata.supplierPostalCode}</td>
                            <td> ${expSupplierCata.aptificialPerson}</td>
                            <td> ${expSupplierCata.linkPhone}</td>
                            <td> ${expSupplierCata.licenceNo}</td>
                            <td> <fmt:formatDate value="${expSupplierCata.licenceDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
                            <td> ${expSupplierCata.permitNo}</td>
                            <td> <fmt:formatDate value="${expSupplierCata.permitDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
                            <td> ${expSupplierCata.remarks}</td>
                            <td>
                                <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/csm/expSupplierCata/form?id=${expSupplierCata.id}')" class="btn btn-success btn-xs">修改</a>
                            </td>
                        </tr>
                        </c:forEach>
                    </table>
                    <div class="pagination">${page}</div>
                </div>
            </div>
        </section>
    </div>
</div>